﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Visa.DB;

namespace VisaApp.Models
{
    public class CauhoiModel
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public Nullable<bool> Status { get; set; }
        public Nullable<System.DateTime> DateCreate { get; set; }
        public Nullable<bool> Detele { get; set; }
        public string Keywork { get; set; }
        public string metaDescription { get; set; }
        public string MetaTitle { get; set; }
        public Nullable<int> UseID { get; set; }
        public string Noidung { get; set; }
        public string regioncode { get; set; }
        public Nullable<int> QuocgiaID { get; set; }
        public string Email { get; set; }
        public string Title { get; set; }
        public string Traloi { get; set; }
        public Nullable<bool> Answered { get; set; }

        public static void mapFrom(CauhoiModel model, ref Cauhoi entity)
        {
            entity.Id = model.Id;
            entity.Name = model.Name;
            entity.Status = model.Status;
            entity.DateCreate = model.DateCreate;
            entity.Noidung = model.Noidung;
            entity.metaDescription = model.metaDescription;
            entity.MetaTitle = model.MetaTitle;
            entity.UseID = model.UseID;
            entity.regioncode = model.regioncode;
            entity.QuocgiaID = model.QuocgiaID;
            entity.Email = model.Email;
            entity.title = model.Title;
            entity.Answered = model.Answered;
            entity.Detele = model.Detele;

        }

        public static void mapFrom( Cauhoi entity, ref CauhoiModel model)
        {
            model.Id = entity.Id;
            model.Name = entity.Name;
            model.Status = entity.Status;
            model.DateCreate = entity.DateCreate;
            model.Noidung = entity.Noidung;
            model.metaDescription = entity.metaDescription;
            model.MetaTitle = entity.MetaTitle;
            model.UseID = entity.UseID;
            model.regioncode = entity.regioncode;
            model.QuocgiaID = entity.QuocgiaID;
            model.Email = entity.Email;
            model.Title = entity.title;
            model.Answered = model.Answered;
            model.Detele = model.Detele;

        }
    }
}